home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
cstdio.arc
/
SRC.ARC
/
FNSCHR.C
< prev
next >
Wrap
Text File
|
1985-04-01
|
1KB
|
84 lines
/* fnschr.c - character functions.
(C) Copyright 1984 Gregory R. Mansfield - All Rights Reserved.
G. R. Mansfield. 84/06/10.
Ver 1.0-5401.
*/
int isalpha(c)
char c;
{
return(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z');
}
int isascii(c)
char c;
{
return(c < 0x80);
}
int iscntl(c)
char c;
{
return(c < 0x20 || c == 0x7F);
}
int isdigit(c)
char c;
{
return(c >= '0' && c <= '9');
}
int islower(c)
char c;
{
return(c >= 'a' && c <= 'z');
}
int isspace(c)
char c;
{
return(c == ' ' || c == '\r' || c == '\n');
}
int isupper(c)
char c;
{
return(c >= 'A' && c <= 'Z');
}
int isalnum(c)
char c;
{
return(isalpha(c) || isdigit(c));
}
int isprint(c)
char c;
{
return(c < 0x80 && !iscntl(c));
}
int ispunct(c)
char c;
{
return(c < 0x80 && !isalnum(c) && ! iscntl(c));
}
int isxdigit(c)
char c;
{
return(isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'));
}
char toupper(c)
char c;
{
return(islower(c) ? c - 32 : c);
}
char tolower(c)
char c;
{
return(isupper(c) ? c + 32 : c);
}